Complete tailwind v4 configuration - #806
Merged
tjementum merged 4 commits intoDec 18, 2025
Merged
Conversation
nickdekesel
reviewed
Dec 17, 2025
Co-authored-by: Thomas Jespersen <tje@platformplatform.net>
…igurations by agent role
tjementum
force-pushed
the
fix-tailwind-v4-configuration
branch
from
December 18, 2025 00:04
966674d to
45321ff
Compare
tjementum
approved these changes
Dec 18, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Upgrade to Tailwind CSS v4 with federated module scoping
Summary & Motivation
Upgrade to Tailwind CSS v4 and implement scoped CSS loading for federated modules to prevent style conflicts in the micro-frontend architecture. With Tailwind v4, CSS is processed at build time rather than runtime, requiring explicit load order control when multiple self-contained systems load styles in the same page.
TailwindPluginwith selector prefixing to scope styles per self-contained system (e.g.,#account-management .buttonvs#back-office .button)tailwind.cssto separatetheme.cssfile@import "tailwindcss/theme"to@import "tailwindcss"with@themeblockstailwind-presetpackage and deletetailwind.config.tsfilesDownstream projects
Move any customization done in
@application/shared-webapp/ui/tailwind.cssto@application/shared-webapp/ui/theme.css. The theme.css file now contains all CSS custom properties (color variables, radius, etc.) while tailwind.css contains Tailwind configuration and utility classes.Add an
idattribute to the<body>tag inyour-self-contained-system/WebApp/public/index.html:Update
your-self-contained-system/WebApp/bootstrap.tsxto import theme.css before tailwind.css:+ import "@repo/ui/theme.css"; import "@repo/ui/tailwind.css";Update
your-self-contained-system/WebApp/rsbuild.config.tsto use the newTailwindPluginwith a scoping prefix:Delete
your-self-contained-system/WebApp/tailwind.config.ts(Tailwind v4 configuration is now in@application/shared-webapp/ui/tailwind.css)Checklist